﻿

using System.Collections;
using System.Collections.Generic;
namespace KPIBalanceScoreCard
{
    public enum ApplicationConstants
    {
        LOGIN_PK,
        LOGIN_NAME,
        CURRENT_NODE,
        IS_TILL_LAST_LEVEL,
        ITEM_GROUPS,
        ITEM_DETAILS_YTD,
        ITEM_DETAILS_MTD,
        SELECTED_ITEM_GROUP,
        SELECTED_ROLE,
        SELECTED_EMPNAME,
        YTD,
        MTD,
        CHOOSEN_NODE_VALUE,
        ORGANIZATION_NAME,
        CURRENT_ROLE,
        TREE_STRUCTURE,
        CHOOSEN_YEAR,
        CHOOSEN_MONTH,
        REFRESH_TREE,
        IS_ADMIN
    }

    public enum Roles
    {
        BM,
        PBO,      
        AreaMgr,
        SO,
        RO,      
        DST,
        PROHIBITED
    }

    public class ApplicationStrings
    {
        public static string BM_GROUP = "'BM', 'RO', 'SO', 'PBO'";
        public static string RO_GROUP = "'RO'";
        public static string SO_GROUP = "''SO'";
        public static string PBO_GROUP = "'PBO'";

        public static string ROLE_PREFIX = "!R@";
        public static string EMP_NAME_PREFIX = "!E@";
        public static string CHILD_GENERATED = "CHILD_GENERATED";
        public static string AREA_MGR = "AreaMgr";

        public static string encryptionKey = "KPIBalanceScoreCard";
    }

    public class HierarchyDSD
    {
        public static System.Collections.Generic.Dictionary<string, string[]> dsdHierarchy = new System.Collections.Generic.Dictionary<string, string[]>();
        
        public static string[][] treeSequence = { new string[]{ "OrganizationParentName", "AreaMgr" }, 
                                                  new string[]{ "OrganizationName", "BM" }
                                                
                                                };
        static HierarchyDSD()
        {
            dsdHierarchy.Add("admin", new string[] { "AreaMgr" });
            dsdHierarchy.Add("AreaMgr", new string[]{Roles.BM.ToString()});
            dsdHierarchy.Add(Roles.BM.ToString(), new string[] { "RO", "SO", "PBO" });
        }
    }
}